﻿Imports System.Xml

Public Class TokenParseException
    Inherits System.Exception

    Private Sub New(message As String)
        MyBase.New(message)
    End Sub

    Public Shared Function Create(message As String, reader As XmlReader) As TokenParseException
        Dim info As IXmlLineInfo = CType(reader, IXmlLineInfo)
        Return New TokenParseException(String.Format("{0}, Line: {1}, Position: {2}", message, info.LineNumber, info.LinePosition))
    End Function
End Class
